﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageWebSiteConfig.aspx.cs" Inherits="Manageweb_Stock_ManageWebSiteConfig" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>会员交易规则设置</title>
    <link href="../images/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
   <div style="margin:0 auto; text-align:center;">
        <table width="750" border="1" cellspacing="0" cellpadding="0" style="margin:0 auto">
            <tr>
                <td style="background-color: #507cd1; color: White; font-weight: bold; text-align: left;">
                    &nbsp;交易规则管理
                    <asp:Label ID="LB_ID" runat="server" Visible="False"></asp:Label>
                </td>
            </tr>
        </table>
        <br />
        <table id="TABLE_Add_Mod" runat="server" border="1" cellpadding="0" cellspacing="0"
            visible="false" width="750" style="margin:0 auto">
            <tr>
                <td colspan="2" style="font-weight: bold; color: white; background-color: #507cd1;
                    text-align: left">
                    &nbsp;<asp:Label ID="LB_TableTitle" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 150px">
                    &nbsp;规则编码
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="txtConfigID" runat="server" Width="240px" Height="18px" 
                        ReadOnly="True"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;规则名称
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="txtConfigName" runat="server" Width="240px" 
                        ReadOnly="True"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;初始值
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="txtConfigValue" runat="server" Width="240px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtConfigValue"
                        Display="Dynamic" ErrorMessage="*" ValidationGroup="Btn_Submit"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtConfigValue"
                        Display="Dynamic" ErrorMessage="格式错误,必须为正浮点数" ValidationExpression="^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$"
                        ValidationGroup="Btn_Submit"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="font-weight: bold; color: white; background-color: #507cd1">
                    <asp:Button ID="Btn_Submit" runat="server" Text="提交" 
                        ValidationGroup="Btn_Submit" onclick="Btn_Submit_Click" />&nbsp;<asp:Button
                        ID="Btn_Cancel" runat="server" Text="取消" />
                </td>
            </tr>
        </table>
        <br />
        <div style="text-align:center; width:750px;"> <asp:Label ID="LB_ManageUser" runat="server" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label></div>
       <br />
        <table border="1" cellpadding="0" cellspacing="0" width="750px" style="margin:0 auto">
            <tr>
                <td>
                    <asp:GridView ID="GV_UserList" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CellPadding="4" DataSourceID="ObjectDataSource1"
                        ForeColor="#333333" Width="100%" EmptyDataText="暂无数据" 
                        >
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="ID" HeaderText="编号" InsertVisible="False" ReadOnly="True"
                                SortExpression="StockCode" />
                            <asp:BoundField DataField="Cdefine1" HeaderText="名称" 
                                SortExpression="StockName" />
                            <asp:BoundField DataField="configvalue" HeaderText="初始值" 
                                SortExpression="CMoney" />
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                             
                                    <asp:LinkButton ID="LBtn_Mod" runat="server" 
                                        
                                        CommandArgument='<%#String.Format("{0}|{1}|{2}|{3}",Eval("id"),Eval("configname"),Eval("configvalue"),Eval("cdefine1")) %>' 
                                        oncommand="LBtn_Mod_Command"  >修改</asp:LinkButton>
                              
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
                        TypeName="SQLExpressDAL.DealRuleTableAdapters.WebSiteConfigTableAdapter">
                    </asp:ObjectDataSource>
                </td>
            </tr>
        </table>
    </div>
    <asp:HiddenField ID="hidConfigName" runat="server" />
    </form>
</body>
</html>
